package unit03.day04;

import java.util.ArrayList;
import java.util.Collection;
import java.util.Iterator;

public class TestPoint {

	public static void main(String[] args) {
//		Point<Integer> p1 = new<Integer> Point(1,2);
//		p1.setX(5);
//		int x1 = p1.getX();
//		System.out.println(x1);
//		
//		Point<Double> p2 = new Point<Double>(1.1,2.2);
//		p2.setX(2.2);
//		Double x2 = p2.getX();
//		System.out.println(x2);
//		
//		Point<String> p3 = new Point<String>("一","二");
//		p3.setX("三");
//		String x3 = p3.getX();
//		System.out.println(x3);
		Point<Integer> p1 = new Point<Integer>(1,2);
		Point p2 = p1;
		p2.setX("一");
//		int x1 = p1.getX();
//		System.out.println(x1);
		
		Collection<String> c = new ArrayList<String>();
		
		c.add("one");
		c.add("#");
		c.add("two");
		c.add("#");
		c.add("three");
		c.add("#");
		c.add("four");
		for(String str:c) {
			System.out.println(str);
		}
		Iterator<String> it = c.iterator();
		while(it.hasNext()) {
			String str = it.next();
			if("#".equals(str)) {
				it.remove();
			}
		}
		System.out.println(c);
	}

}
